<template>
	<view>
		<view class="outimage">
			<view class="display">
				<view class="image" v-for="(n,index) in images">
					<image  lazy-load="true" @click="clickimage(n.imagehref)" v-bind:src="n.imagehref" show-menu-by-longpress="true">
					</image>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				images:[]
			}
		},
		methods: {
			clickimage:function(url){
				uni.showLoading({title: '加载中',mask:true});
				uni.previewImage({
					current: 0,
					urls: [url],
					success(res) {
						setTimeout(function () {uni.hideLoading();}, 0)
					}
				})
			}
		},
		onLoad(option) {
			var that=this
			that.images=JSON.parse(option.data)
			
		}
	}
</script>

<style>
.outimage {
		display: flex;
		justify-content: center;
	}

	.display {
		display: inline-flex;
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: space-evenly;
		width: 95vw;
	}

	.image {
		width: 29%;
		zoom: 0.4;
		border-radius: 15px;
		overflow: hidden;
	}
</style>
